package com.javalab._7thread._2Operate._5Interrupt;

/**
 * interrupt()方法只会修改线程的中断状态位置，不会真的打断线程的执行
 * 需要特地的去实现才能真正的中断
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        InterruptThread interruptThread = new InterruptThread();
        NormalThread normalThread = new NormalThread();
        interruptThread.start();
        normalThread.start();
        Thread.sleep(1000);
        // 打断线程执行
        interruptThread.interrupt();
        // 由于不支持打断，所以此操作无任何效果
        normalThread.interrupt();
    }
}
